package com.burgeon.backend.college.control_panel.service;

import com.burgeon.backend.SHOPBACKEND.service.ex.ErrorDataException;
import com.burgeon.backend.SHOPBACKEND.service.ex.UploadException;
import com.burgeon.backend.college.control_panel.entity.Course;
import com.burgeon.backend.college.control_panel.entity.Exam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;

public interface BackendCollegeService {

    void exportAchievement(String examId,HttpServletResponse response);

    HashMap uploadCourseware(MultipartFile coursewareFile,String token) throws UploadException;

    void upExamItemSort(String id,Integer num);

    void setExam(String id,String course_id,String publisher,
                 String startTime,String endTime,Integer examDuration);

    void consentExam(String id);

    HashMap getExamRecord(String name,String examId,Integer start);

    void delCourse(String id);

    void delExam(String id);

    Exam getExam(String id);

    List<Course> getCourseList(String account);

    void upExamSwitch(String id,String EW);

    //课程
    void upCourse(MultipartFile imgFile,String code,String type, Course course) throws UploadException;

    void createCourse(MultipartFile imgFile, String code,String type, Course course) throws Exception;

    HashMap getCourse(String field,String message,String token, int start);

    //********************************************

    //上传考题
    void uploadingExam(String id,MultipartFile file)throws UploadException;

    //发布考题
    void publishExam(String id) throws Exception;

    void downloadTemplate(HttpServletResponse response) throws ErrorDataException;

    void createExamItem(String eid,String title,int score,String result)throws ErrorDataException;

    void createOption(String eiid,String value) throws ErrorDataException;

    void upExamItem(String id,String title,int score,String result)throws ErrorDataException;

    void upOption(String id,String value)throws ErrorDataException;

    void delExamItem(String id) throws ErrorDataException;

    void delOption(String id) throws ErrorDataException;

    HashMap getExam(String field,String message,int start,String token);

    HashMap createExam(String id,String publisher,String startTime,String endTime,
                       int examDuration,String token) throws UploadException,ErrorDataException;
}
